#ifndef     __MOTORS_H
#define     __MOTORS_H

#include "../utils/object.h"
#include "../utils/nocopyable.h"
#include "../utils/error.h"

namespace heat_driver {

class Motors : private NoCopyable, public Object<Motors> {

public:
    static constexpr uint32_t STIR_CAP_TIMEOUT = 10 * 1000;
    static constexpr uint32_t HOLD_TIMEOUT = 8 * 1000;
    static constexpr uint32_t FILM_TIMEOUT = 8 * 1000;

    static constexpr uint32_t STIR_CAP_ALM = 600;
    static constexpr uint32_t HOLD_ALM = 600;
    static constexpr uint32_t FILM_ALM = 600;

    void init();

    Error stir_cap_open();
    Error stir_cap_close();

    Error hold_left();
    Error hold_right();

    Error film_up();
    Error film_down();

    void stir_open_cw();
    void stir_open_ccw();
    void stir_close();
};

extern Motors motors;

}

#endif
